<!DOCTYPE html>
<html>
{include file="public/header" /}
<body>


<div class="layui-fluid" id="app">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <!--<div class="layui-card-header">财务报表,提现管理</div>-->
                <div class="layui-card-body">

                    <form class="layui-form" action="" lay-filter="component-form-group">
                        <!--<div class="layui-card-header">表单组合</div>-->
                        <div class="layui-card-body" style="padding: 15px;">

                            <input type="hidden" name="id" value="{$item.id}">

                            <div class="layui-form-item">
                                <label class="layui-form-label">名称</label>
                                <div class="layui-input-block">
                                    <input type="text" name="title" lay-verify="required"
                                           autocomplete="off"
                                           value="{$item.title}"
                                           placeholder="请输入"
                                           class="layui-input">
                                </div>
                            </div>

                            <div class="layui-form-item layui-form-text">
                                <label class="layui-form-label">内容</label>
                                <div class="layui-input-block">
                                                <textarea name="content" placeholder="请输入内容" rows="20"
                                                          class="layui-textarea">{$item.content}</textarea>
                                </div>
                            </div>


                        </div>

                        <div class="layui-form-item form-footer2">
                            <div class="layui-input-block">
                                <div class="layui-footer">
                                    <button class="layui-btn" lay-submit=""
                                            lay-filter="component-form-demo1">保存
                                    </button>

                                </div>
                            </div>
                        </div>

                    </form>

                </div>


            </div>

        </div>


    </div>
</div>


<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
<script>
    //vue对象
    var app = new Vue({
        el: '#app',
        data: {
            check: [],
            curr: 1,//当前页
            limit: 10,//当前页
            items: []
        }
    });


    //按需引入layui模块
    layui.use(['laypage', 'layer', 'table', 'element'], function () {
        var laypage = layui.laypage
            , layer = layui.layer;
        var table = layui.table;
        var element = layui.element;
        var form = layui.form;
        element.on('tab(docDemoTabBrief)', function (data) {
//            console.log(this); //当前Tab标题所在的原始DOM元素
//            console.log(data.index); //得到当前Tab的所在下标
//            console.log(data.elem); //得到当前的Tab大容器
//            if (data.index == 0) {
//                init();
//            }
        });

        /* 监听提交 */
        form.on('submit(component-form-demo1)', function (data) {

            $.post("{:url('biaozhun_detail')}", data.field, function (res) {
                if (res.code == 1) {
                    parent.layer.msg(res.msg, {icon: 1})
                    $('form')[0].reset();
                    parent.init();
                    return false;
                } else {
                    parent.layer.msg(res.msg, {icon: 2})
                    return false;
                }
            });


            return false;
        });


    });


</script>


</body>
</html>




